<?php
/*
	插件概览
*/
global $_RQ,$_AR;
$merchid=$this->checklogin();
$_RQ['op']=$_RQ['op']?$_RQ['op']:'edit';
$return=array();
if($_RQ['op']=='edit'){
	$item=$this->plugin_setting('shopset');
    $return['item']=$item;
	$return['status']=array('1'=>'开启','0'=>'关闭');
	$htmls=array(
		'type'=>'edit',
		'post'=>'post',
		'desc'=>'商城设置',
		'edit'=>array(
					array('type'=>'string','title'=>'商城名称','name'=>'title'),
					array('type'=>'image','title'=>'商城logo','name'=>'logo'),
					array('type'=>'string','title'=>'商城简介','name'=>'desc'),
					array('type'=>'time_hour','title'=>'营业时间','name'=>'time'),
					//array('type'=>'image','title'=>'店招','name'=>'image'),
					array('type'=>'image','title'=>'海报','name'=>'poster'),
					array('type'=>'radio','title'=>'获取关注人信息','name'=>'getinfo','options'=>'status','help'=>'如果开启此选项,则是会弹出绿色微信授权框'),
					array('type'=>'image','title'=>'售罄图标','name'=>'shouqi'),
					array('type'=>'image','title'=>'加载图标','name'=>'loading'),
					array('type'=>'radio','title'=>'开启导航条','name'=>'opendh','options'=>'status'),
					//array('type'=>'string','title'=>'商品库存预警','name'=>'warning','help'=>'当后台商品列表中商品库存小于此值时特殊标记(值为零时不提示'),
					
			),
		);
	$return['htmls']=$htmls;
	if($_SESSION['os']=='mobile'){
		$return['htmls']=$this->template_url('merch/shop_index');
	}
	exi($return);
}
if($_RQ['op']=='post'){
	$postdata=get_postdata();
	$item=$this->plugin_setting('shopset',$postdata);
	exi('设置成功');
}